<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<title>{&SITE_TITLE}</title>
	<link href="__PUBLIC__/admin/css/layout.css" rel="stylesheet" type="text/css" />
	<script type="text/javascript">
		var ctrl = function(name){
			this.elements = document.getElementsByName('id[]');
			this.length = this.elements.length;
		}
		ctrl.prototype = {
			reverse:function(){
				for(i=0;i<this.length;i++){
					this.elements[i].checked= !this.elements[i].checked;
				}
			},
			all:function(){
				for(i=0;i<this.length;i++){
					this.elements[i].checked = true;
				}
			},
			unAll:function(){
				for(i=0;i<this.length;i++){
					this.elements[i].checked = false;
				}
			},
			toggle:function(obj){
				this[obj.checked ? 'all' : 'unAll']();
			},
			del:function(id){
				if(id==undefined){
					id = [];
					for(i=0;i<this.length;i++){
						this.elements[i].checked && id.push(this.elements[i].value);
					}
					id = id.join(',');
				}
				location.href = "__URL__/delnode/id/"+id;
			},
			edit:function(id){
				location.href = "__URL__/node/id/"+id;
			}
		}
		var c = null;
	</script>
    
	</head>
	<body>
		<div id="container">
			<table class="tableborder" width="100%">
				<tbody>
					<tr class="top">
						<td class="border"></td>
					</tr>
					<tr>
						<th class="header">tips</th>
					</tr>
					<tr>
						<td class="tips">
							<ul>
								<li>ThinkSnS系统后台权限配置 - 菜单管理</li>
							</ul>
						</td>
					</tr>
					<tr class="bottom">
						<td class="border" colspan="5">&nbsp;</td>
					</tr>
				</tbody>
			</table>
			<table class="tableborder" width="100%">
				<tbody>
					<tr class="top">
						<td class="border" colspan="7"></td>
					</tr>
					<tr>
						<th class="header" colspan="7">标题</th>
					</tr>
					<tr class="label">
						<th>编号</th>
						<th>节点名称</th>
						<th>显示名</th>
						<th>描述</th>
						<th>状态</th>
						<th>排序</th>
						<th>操作</th>
					</tr>
<volist id="vo" name="list">
		<tr class="cell altbg2" style="height:30px;">
		<td >{$vo.id}</td>
<php>if($level>=3){</php>	
		<td >{$vo.name}</td>
		<td >{$vo.title}</td>
<php>}else{</php>
		<td ><a href="__URL__/node/pid/{$vo.id}">{$vo.name}</a></td>
		<td ><a href="__URL__/node/pid/{$vo.id}">{$vo.title}</a></td>
<php>}</php>
		<td >{$vo.description}</td>
		<td ><php>if($vo.state){</php>开启<php>}else{</php>关闭<php>}</php></td>
		<td >
			上移 下移
        </td>
		<td style="width:15%">编辑 删除</td>
	</tr>
</volist>					
					<tr>
						<td class="footer" colspan="7">
							&nbsp;
						</td>
					</tr>
					<tr class="bottom">
						<td class="border" colspan="7">&nbsp;</td>
					</tr>
				</tbody>
			</table>
			<table class="tableborder" width="100%">
			<form action="__URL__/addnode" method="POST">
			<input type="hidden" name="level" value="{$level}" />
			<input type="hidden" name="pid" value="{$pid}" />
				<tbody>
					<tr class="top">
						<td class="border" colspan="2"></td>
					</tr>
					<tr>
						<th class="header" colspan="2">添加栏目</th>
					</tr>
					<tr class="label">
						<th>说明</th>
						<th>设置</th>
					</tr>
					<tr class="cell">
						<td class="altbg1">
							<b>节点名:</b>
							<br/>
							<span class="smalltxt">后台节点</span>parameter
						</td>
						<td class="altbg2"><input name="name" class="txt"/> </td>
					</tr>
					
					<tr class="cell">
						<td class="altbg1">
							<b>显示名:</b>
							<br/>
							<span class="smalltxt">后台显示名</span>
						</td>
						<td class="altbg2"><input name="title" class="txt"/></td>
					</tr>
					
					<tr class="cell">
						<td class="altbg1">
							<b>状态:</b>
							<br/>
							<span class="smalltxt">后台显示名</span>
						</td>
						<td class="altbg2">
							<select name="state">
								<option value="1">开启</option>
								<option value="0">关闭</option>
							</select>
						</td>
					</tr>										
	
					<tr class="cell">
						<td class="altbg1">
							<b>描述:</b>
							<br/>
							<span class="smalltxt">对节点的描述</span>
						</td>
						<td class="altbg2">
							<textarea cols="30" name="description" rows="5" ></textarea>
						</td>
					</tr>
					<tr>
						<td class="footer" colspan="2">
							<input type="submit" class="button" value="添加" />
						</td>
					</tr>
					<tr class="bottom">
						<td class="border" colspan="5">&nbsp;</td>
					</tr>
				</tbody>
			  </form>
			</table>
		</div>
		<script type="text/javascript">
			c = new ctrl('id[]');
		</script>
	</body>
</html>
